<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script type="text/javascript" src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
<script type="text/javascript">
$(function(){
	//alert(location.href);
	 var obje={url:location.href.split('#')[0]};
	 $.ajax({
	 	  type:"post",
	 	  url:"WeChat/accessToken/jsapiTicket.do",
	 	  data:obje,
	 	  dataType:"json",
	 	  success:function(data){
	 		 wx.config({  
	 	        debug : false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。  
	 	        appId :"wxe90031fe109d954d", // 必填，公众号的唯一标识  
	 	        timestamp : data.timestamp, // 必填，生成签名的时间戳  
	 	        nonceStr : data.nonceStr, // 必填，生成签名的随机串  
	 	        signature : data.signature,// 必填，签名，见附录1  
	 	        jsApiList: ['checkJsApi','onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone','hideMenuItems','showMenuItems','hideAllNonBaseMenuItem','showAllNonBaseMenuItem','translateVoice','startRecord','stopRecord','onVoiceRecordEnd','playVoice','onVoicePlayEnd','pauseVoice','stopVoice','uploadVoice','downloadVoice','chooseImage','previewImage','uploadImage','downloadImage','getNetworkType','getLocalImgData','openLocation','getLocation','hideOptionMenu','showOptionMenu','closeWindow','scanQRCode','chooseWXPay','openProductSpecificView','addCard','chooseCard','openCard']
	 	     }); 
	 		 
	 	  },
	 	  error:function(){
	 	  }
	   });
});
</script>
</head>
<body>
</body>
</html>